package com.reading.common.entity.view;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.hibernate.validator.constraints.NotEmpty;

import javax.validation.constraints.NotNull;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Sequence {

    @NotEmpty(message = "序号名称不得为空。")
    private String seqName;

    @NotNull(message = "序号初始值不得为空。")
    private Integer seqStartValue;

    public Sequence(String seqName) {
        this.seqName = seqName;
        this.seqStartValue = 1;
    }
}